﻿<UserControls:ScrumUserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.View.DailyScrumIndividualReport"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008" xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View"
    xmlns:CustomControl="clr-namespace:ScrumTable.UI.View.CustomControl;assembly=ScrumTable.UI.View"
    xmlns:ViewModel="clr-namespace:ScrumTable.UI.ViewModel;assembly=ScrumTable.UI.ViewModel"
    xmlns:Localization="clr-namespace:ScrumTable.UI.View.Localization;assembly=ScrumTable.UI.View" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls" Background="White"  VerticalAlignment="Stretch">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="RootGrid">
        <Grid.Resources>
            <Converter:GridHiddenWidthConverter GridUnitType="Pixel" x:Key="IsGridColumVisibleConverter"/>
            <DataTemplate x:Key="MemberListTemplate">
                <UserControls:MemberControl></UserControls:MemberControl>
            </DataTemplate>
            <Converter:ConverterIsNullVisibility x:Key="IsNullConverter"/>

        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="10"/>
            <RowDefinition Height="90"/>
            <RowDefinition Height="10"/>            
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{Binding ConfigManager.Config.IsHiddenDailyScrum, Converter={StaticResource IsGridColumVisibleConverter}, ConverterParameter='300'}" />            
            <ColumnDefinition Width="30"/> 
        </Grid.ColumnDefinitions>

        <UserControl Background="{StaticResource IndividualBackground}" Width="491" VerticalAlignment="Stretch" HorizontalAlignment="Left" Grid.RowSpan="10" Grid.ColumnSpan="10"/>

       <Grid Grid.Row="1"  Grid.ColumnSpan="10" VerticalAlignment="Center" HorizontalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <CustomControl:DigitalClock x:Name="ClockGlobal" Grid.Column="0"  VerticalContentAlignment="Center" FontSize="50" FontWeight="Bold"  HorizontalAlignment="Center"/>

            <UserControls:SurfaceDragDropListBox x:Name="MembersListBox" Grid.Column="1" ItemsAreStatic="True" HorizontalContentAlignment="Stretch" Height="84"  
                Orientation="Horizontal"
                SelectedItem="{Binding CurrentMember, Mode=TwoWay}" ItemsSource="{Binding Path=Members}" ItemTemplate="{StaticResource MemberListTemplate}"
                SelectionChanged="OnSurfaceListBoxSelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="0,6,125,0">
            </UserControls:SurfaceDragDropListBox>
            <s:SurfaceButton FontSize="20" FontWeight="Bold"  Grid.Column="1" Click="OnNextButtonClick" Margin="0,6,12,0" VerticalAlignment="Center" HorizontalAlignment="Right" Width="85" Height="70">
                <StackPanel Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Image DockPanel.Dock="Right" Margin="0,0,0,0" VerticalAlignment="Center" Height="35" Source="pack://application:,,,/ScrumTable.UI.View;component/Resources/arrow.png" />
                    <TextBlock VerticalAlignment="Center" Margin="0,0,0,0" TextWrapping="Wrap" Localization:Translate.Uid="IndividualReport_Button_Next" Text="{Localization:Translate Default=[Next]}" />
                </StackPanel>
            </s:SurfaceButton>
        </Grid>

        <StackPanel  Grid.Row="3" Margin="10,0,0,0" Width="68" HorizontalAlignment="Left" Visibility="{Binding CurrentMember, Converter={StaticResource IsNullConverter}}">
            <CustomControl:DigitalClock Padding="1" x:Name="Clock" HorizontalAlignment="Center" FontSize="14" FontWeight="Bold" VerticalAlignment="Top" />
            <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Top">
                <CustomControl:WebAsyncReportMemberImage UriBitmap="{Binding CurrentMember.Picture}" MaxWidth="64" MaxHeight="64" > </CustomControl:WebAsyncReportMemberImage>                
            </Border>
        </StackPanel>

        <Grid Grid.Row="3" VerticalAlignment="Top" Margin="81,14,10,0" Height="80"  Visibility="{Binding CurrentMember, Converter={StaticResource IsNullConverter}}">
            <Grid VerticalAlignment="Center">
            <TextBlock TextWrapping="Wrap" FontSize="30" FontWeight="Bold" Text="{Binding CurrentMember.Name}" />
            </Grid>
        </Grid>

        <UserControls:BarControl  Visibility="{Binding CurrentMember, Converter={StaticResource IsNullConverter}}" Grid.Row="3" Margin="12,100,12,0" VerticalAlignment="Top" FirstColorText="White"  SecondColorText="White" Height="30"  
            FirstValue="{Binding CurrentMember.WorkCompleted}" SecondValue="{Binding CurrentMember.WorkRemaining}" FirstColor="Green" SecondColor="Red" BackColor="White"/>

        <StackPanel Orientation="Vertical" Grid.Row="3" Grid.RowSpan="2" Margin="12,150,10,0" VerticalAlignment="Top">
            <DockPanel>
                <TextBlock DockPanel.Dock="Left" FontSize="20" FontWeight="Bold" Margin="0,0,5,0">1.</TextBlock>
                <TextBlock Localization:Translate.Uid="IndividualReport_Activity_1" Text="{Localization:Translate Default=[Text 1]}"  TextWrapping="Wrap" FontSize="20"/>
            </DockPanel>

            <DockPanel>
                <TextBlock DockPanel.Dock="Left" FontSize="20" FontWeight="Bold" Margin="0,0,5,0">2.</TextBlock>
                <TextBlock Localization:Translate.Uid="IndividualReport_Activity_2" Text="{Localization:Translate Default=[Text 2]}"  TextWrapping="Wrap" FontSize="20"/>
            </DockPanel>

            <DockPanel>
                <TextBlock DockPanel.Dock="Left" FontSize="20" FontWeight="Bold" Margin="0,0,5,0">3.</TextBlock>
                <TextBlock Localization:Translate.Uid="IndividualReport_Activity_3" Text="{Localization:Translate Default=[Text 3]}"  TextWrapping="Wrap" FontSize="20"/>
            </DockPanel>         
        </StackPanel>

         

        <Border CornerRadius="5,0,0,5" Grid.Column="1" Grid.Row="3"  BorderBrush="{Binding ElementName=MembersListBox, Path=BorderBrush}" BorderThickness="0"  Margin="0,0,0,0" Background="{StaticResource ListBoxBackgroundHorizontalInvert}" >
            <Label Opacity="0.75"  Content="{Localization:Translate Default=[Assigned], Uid=IndividualReport_Assigned}" Margin="0" Padding="0" Grid.Column="1"  HorizontalContentAlignment="Center" VerticalAlignment="Center"  FontSize="20" FontWeight="Bold" >
                <Label.LayoutTransform>
                    <RotateTransform Angle="90"/>
                </Label.LayoutTransform>
            </Label>
        </Border>        

        <Border CornerRadius="5,0,0,5" Grid.Column="1" Grid.Row="4"  BorderBrush="{Binding ElementName=MembersListBox, Path=BorderBrush}" BorderThickness="0" Margin="0,1,0,0" Background="{StaticResource ListBoxBackgroundHorizontalInvert}" >
            <Label Opacity="0.75" Content="{Localization:Translate Default=[Not_Assigned], Uid=IndividualReport_Not_Assigned}" Margin="0" Padding="0" Grid.Column="1"  HorizontalContentAlignment="Center" VerticalAlignment="Center"  FontSize="20" FontWeight="Bold" >
                <Label.LayoutTransform>
                    <RotateTransform Angle="90"/>
                </Label.LayoutTransform>
            </Label>
        </Border>
    </Grid>
</UserControls:ScrumUserControl>

    